<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of c_apply_event_model
 *
 * @author djerom
 */
class c_page_model /* extends c_base_model*/{
	
	var $exists = false;
	var $data = array();
	
	function c_page_model($id)
	{
		global $mvc;
		$id = (int)$id;
		$data = $mvc->db->get_data('SELECT * FROM pages WHERE id="'.$id.'"');
		if (sizeof($data) > 0)
		{
			$this->data = $data[0];
			$this->exists = true;
		}
		else
		{
			$this->data['page'] = array();
			$this->exists = false;
		}
	}
}
?>
